package com.docmanage.am.domain;

import com.docmanage.common.annotation.Excel;
import com.docmanage.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 档案文件对象 am_archive
 *
 * @author pointLion
 * @date 2023-06-18
 */
@Data
public class AmArchive extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 档案编号
     */
    @Excel(name = "档案编号")
    private String code;

    /**
     * 档案标题
     */
    @Excel(name = "档案标题")
    private String title;

    /**
     * 档案副标题
     */
    @Excel(name = "档案副标题")
    private String subTitle;

    /**
     * 档案分类
     */
    @Excel(name = "档案分类")
    private String groupId;

    /**
     * 地址
     */
    @Excel(name = "地址")
    private String url;

    /**
     * 流程状态。0：未提交。1：审批中。2：已完成
     */
    @Excel(name = "流程状态。0：未提交。1：审批中。2：已完成")
    private String status;

    /**
     * 借阅状态。0：正常。1：被借走。
     */
    @Excel(name = "借阅状态。0：正常。1：被借走。")
    private String brStatus;

    /**
     * 是否可用。0：启用。1：停用
     */
    @Excel(name = "是否可用。0：启用。1：停用")
    private String available;

    /**
     * 档案柜
     */
    @Excel(name = "档案柜")
    private Long cabinetId;

    /**
     * 文件夹
     */
    @Excel(name = "文件夹")
    private Long folderId;

    /**
     * 用户ID（单据 拥有者）
     */
    @Excel(name = "用户ID", readConverterExp = "单=据,拥=有者")
    private Long userId;

    /**
     * 部门ID（单据拥有部门）
     */
    @Excel(name = "部门ID", readConverterExp = "单=据拥有部门")
    private Long deptId;

    /**
     * 申请流程
     */
    @Excel(name = "申请流程")
    private String flowKey;

    /**
     * 流程实例id
     */
    @Excel(name = "流程实例id")
    private String flowInsId;

    /**
     * 提交时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date submitTime;

    /**
     * 租户ID
     */
    @Excel(name = "租户ID")
    private Long tenantId;

    /**
     * 档案id
     */
    @Excel(name = "档案id")
    private Long descriptionId;

    /**
     * 文件夹路径
     */
    @Excel(name = "文件夹路径")
    private String folderPath;

    /**
     * 档案柜地址
     */
    @Excel(name = "档案柜地址")
    private String cabinetPath;

    /** 文件类型 */
    @Excel(name = "文件类型")
    private String dirId;

    /** 删除标志 0正常  1删除 */
    @Excel(name = "删除标志 0正常  1删除")
    private Integer isDel;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUrl() {
        return url;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setBrStatus(String brStatus) {
        this.brStatus = brStatus;
    }

    public String getBrStatus() {
        return brStatus;
    }

    public void setAvailable(String available) {
        this.available = available;
    }

    public String getAvailable() {
        return available;
    }

    public void setCabinetId(Long cabinetId) {
        this.cabinetId = cabinetId;
    }

    public Long getCabinetId() {
        return cabinetId;
    }

    public void setFolderId(Long folderId) {
        this.folderId = folderId;
    }

    public Long getFolderId() {
        return folderId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setFlowKey(String flowKey) {
        this.flowKey = flowKey;
    }

    public String getFlowKey() {
        return flowKey;
    }

    public void setFlowInsId(String flowInsId) {
        this.flowInsId = flowInsId;
    }

    public String getFlowInsId() {
        return flowInsId;
    }

    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    public Date getSubmitTime() {
        return submitTime;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public Long getTenantId() {
        return tenantId;
    }

    public void setDescriptionId(Long descriptionId) {
        this.descriptionId = descriptionId;
    }

    public Long getDescriptionId() {
        return descriptionId;
    }

    public String getFolderPath() {
        return folderPath;
    }

    public void setFolderPath(String folderPath) {
        this.folderPath = folderPath;
    }

    public String getCabinetPath() {
        return cabinetPath;
    }

    public void setCabinetPath(String cabinetPath) {
        this.cabinetPath = cabinetPath;
    }

    public String getDirId() {
        return dirId;
    }

    public void setDirId(String dirId) {
        this.dirId = dirId;
    }

    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("code", getCode())
                .append("title", getTitle())
                .append("subTitle", getSubTitle())
                .append("groupId", getGroupId())
                .append("url", getUrl())
                .append("status", getStatus())
                .append("brStatus", getBrStatus())
                .append("available", getAvailable())
                .append("cabinetId", getCabinetId())
                .append("folderId", getFolderId())
                .append("userId", getUserId())
                .append("deptId", getDeptId())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("flowKey", getFlowKey())
                .append("flowInsId", getFlowInsId())
                .append("submitTime", getSubmitTime())
                .append("remark", getRemark())
                .append("tenantId", getTenantId())
                .append("descriptionId", getDescriptionId())
                .toString();
    }
}
